<style>
    .layui-form .layui-form-item .layui-inline .layui-form-label {
        width: 100px;
    }
</style>
<form class="layui-form seller-form" action="">
    <div class="layui-tab">
        <ul class="layui-tab-title">
            <li><a href="{:url('alipay')}">详细记录</a></li>
            <li class="layui-this"><a href="{:url('alipayData')}">统计数据</a></li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <div class="layui-inline">
                    <div class="layui-input-inline seller-inline-3">
                        <input type="text" name="username" placeholder="用户名称" autocomplete="off"
                               maxlength="50" class="layui-input">
                    </div>
                </div>
<!--                <div class="layui-inline">-->
<!--                    <select name="pay_status" >-->
<!--                        <option value="">请选择支付状态</option>-->
<!--                        <option value="0">等待中</option>-->
<!--                        <option value="1">支付成功</option>-->
<!--                        <option value="2">支付失败</option>-->
<!--                    </select>-->
<!--                </div>-->
                <div class="layui-inline" style="padding-left: 5px;">
                    <input type="text" name="datetime" id="datetime" placeholder="Start Time _ End Time" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-inline">
                    <div class="layui-input-block">
                        <button class="layui-btn layui-btn-sm" lay-submit lay-filter="search"><i class="iconfont icon-chaxun"></i>Search</button>
                    </div>
                </div>
            </div>
            <div class="layui-tab-item">
                <div class="table-body">
                    <table id="userTable2" lay-filter="test"></table>
                </div>
            </div>
        </div>
    </div>
</form>

<div class="table-body">
    <table id="dataTable" lay-filter="dataTable" ></table>
</div>

<script>
    layui.use(['form',  'laydate' , 'table'], function () {
        var laydate = layui.laydate,
            form = layui.form,
            table = layui.table; //表格
        //时间插件
        laydate.render({
            elem: '#datetime',
            range: '_',
            format: 'yyyy-MM-dd'
        });
        var tableIn = layui.table.render({
            elem: '#dataTable',
            height: 'full-99',
            cellMinWidth: '80',
            totalRow: true,
            url: "{:url('alipayData')}",
            method:'POST',
            cols: [[
                { type: 'numbers'},
                { field: 'days',align: 'center', title: '统计时间',width:250},
                { field: 'amount',  align: 'right', title: '金额($)',width: 150,
                    style:'color:#FF5722;font-weight:bold',totalRow: true},
                { field: 'amount_en',  align: 'right', title: '金额(¥)',width: 150,
                    style:'color:#FF5722;font-weight:bold',totalRow: true},
            ]],
            page: true,
            limit: 1000,
            limits: [1000],
        });
        layui.form.on('submit(search)', function (data) {
            layui.table.reload('dataTable', {
                where: data.field
                , page: {
                    curr: 1 //重新从第 1 页开始
                },
                method:'POST'
            });
            return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });
    });
</script>